package com.aletto.general_store.ui.fragments;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.aletto.general_store.R;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

/**
 * 聊天
 */
public class ChatListFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_chat_list, container, false);
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        TextView tvDate = view.findViewById(R.id.tv_date);
        ImageView ivAvatar = view.findViewById(R.id.iv_avatar);
        TextView tvNickname = view.findViewById(R.id.tv_nickname);
        TextView tvContent = view.findViewById(R.id.tv_msg_content);

        tvDate.setText("昨天");
        tvContent.setText("谢谢再次购物！");
        tvNickname.setText(R.string.app_name);
        ivAvatar.setImageResource(R.drawable.ic_launcher_foreground_black);
    }

}
